import { Message } from '@arco-design/web-vue';
import { useUserStore } from '@/store';

export default function useUser() {
  const userStore = useUserStore();
  const logout = async () => {
    await userStore.logout();
    Message.success('登出成功');
    window.location.href = '/login';
  };
  return {
    logout,
  };
}
